home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #2 / Amiga Plus CD - 1995 - No. 2.iso / internet / faq / englisch / sgi-graphics < prev    next >
Encoding:
Text File  |  1995-04-11  |  72.9 KB  |  1,998 lines

  1. Archive-name: sgi/faq/graphics
  2. Last-modified: Sat Feb 11 16:28:44 CST 1995
  3.  
  4.     SGI graphics Frequently Asked Questions (FAQ)
  5.  
  6. This is one of the Silicon Graphics FAQ series, which consists of:
  7.  
  8.     SGI admin FAQ - IRIX system administration
  9.     SGI apps FAQ - Applications and miscellaneous programming
  10.     SGI audio FAQ - Audio applications and programming
  11.     SGI graphics FAQ - Graphics and user environment customization
  12.     SGI hardware FAQ - Hardware
  13.     SGI impressario FAQ - IRIS Impressario
  14.     SGI inventor FAQ - IRIS Inventor
  15.     SGI misc FAQ - Introduction & miscellaneous information
  16.     SGI movie FAQ - Movies
  17.     SGI performer FAQ - IRIS Performer
  18.     SGI pointer FAQ - Pointer to the other FAQs
  19.  
  20. Read the misc FAQ for information about the FAQs themselves.  Each FAQ
  21. is posted to comp.sys.sgi.misc and to the news.answers and comp.answers
  22. newsgroups (whose purpose is to store FAQs) twice per month.  If you
  23. can't find one of the FAQs with your news program, you can get it by
  24. anonymous FTP from one of these sites:
  25.  
  26.     viz.tamu.edu:/pub/sgi/faq/
  27.     rtfm.mit.edu:/pub/usenet/news.answers/sgi/faq/
  28.     ftp.uu.net:/usenet/news.answers/sgi/faq/
  29.  
  30. Note that rtfm.mit.edu is home to many other FAQs and informational
  31. documents, and is a good place to look if you can't find an answer here.
  32. If you can't use FTP, send mail to mail-server@rtfm.mit.edu with the
  33. word 'help' on a line by itself in the text, and it will send you a
  34. document describing how to get files from rtfm.mit.edu by mail. Send the
  35. command 'send usenet/news.answers/sgi/faq/misc' to get the SGI misc FAQ,
  36. and similarly for the other FAQs. Finally, the FAQs are on the World
  37. Wide Web at
  38.  
  39.     http://www.cis.ohio-state.edu/hypertext/faq/usenet/sgi/top.html
  40.  
  41. The SGI FAQs are freely distributable and we encourage wide circulation.
  42. You MUST keep the FAQs intact, including headers and this notice.  The
  43. contents are accurate as far as we know, but the usual disclaimers
  44. apply. (In particular, copies of the SGI FAQs published on paper or
  45. CD-ROM are certain to be out of date!) Please send additions and changes
  46. to sgi-faq@viz.tamu.edu.
  47.  
  48. Topics covered in this FAQ:
  49. ---------------------------
  50.    -1- DISPLAYS AND DGL
  51.    -2- How can I run a program on one machine and display it on another?
  52.    -3- Does the DISPLAY environment variable work for GL applications?
  53.    -4- Why doesn't the DISPLAY environment variable seem to work?
  54.    -5- Why do I get DGL errors when I try to run a GL program?
  55.    -6- CUSTOMIZING
  56.    -7- What tools does SGI provide to help with the customization
  57.        process?
  58.    -8- What are the important login and resource files for IRIX 4.0.x?
  59.    -9- What is the sequence of events that occur at login time in IRIX
  60.        4.0.x?
  61.   -10- What is the difference between .xsession and .sgisession in IRIX
  62.        4.0.x?
  63.   -11- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
  64.        environment variable I set in my shell's startup files in IRIX
  65.        4.0.x?
  66.   -12- How can I save my screen layout in IRIX 4.0.x?
  67.   -13- How can I turn off the IRIX 5.2 Magic user environment?
  68.   -14- Where is the default value of PATH set?
  69.   -15- Why can't I log in after copying /usr/lib/X11/xdm/Xsession to
  70.        .xsession?
  71.   -16- How can I find out what fonts are available?
  72.   -17- How can I use the Alt key as a Meta key in an xwsh window?
  73.   -18- How can I configure my keyboard like a VT100?
  74.   -19- RESOURCES
  75.   -20- What are resources?
  76.   -21- How can I set resources?
  77.   -22- How can I use resources to run the same program twice with
  78.        different attributes?
  79.   -23- Does the GL recognize resources?
  80.   -24- How can I know what resources I can set for an application?
  81.   -25- What is a good approach to take in looking for resources?
  82.   -26- What is the precedence for resource files?
  83.   -27- Why do long resources cause X to crash mysteriously in IRIX 5.2?
  84.   -28- 4DWM
  85.   -29- Where can I learn more about the Window Manager?
  86.   -30- What files affect the window manager and what is their
  87.        relationship to each other?
  88.   -31- Do I need my own .4Dwmrc file?
  89.   -32- Can I run a different window manager?
  90.   -33- How can I choose a different window manager as the default?
  91.   -34- How can I recover from a failed window manager customization
  92.        attempt?
  93.   -35- Why is an extra 4Dwm burning CPU in IRIX 4.0.x?
  94.   -36- Why doesn't the window manager's "Log Out" routine work in IRIX
  95.        4.0.5?
  96.   -37- ADMINISTRATION
  97.   -38- How can I log into pandora/clogin without bringing up graphics?
  98.   -39- How can I restart the console?
  99.   -40- How can I start and stop the graphics system?
  100.   -41- How can I kill the X server without logging in or rebooting?
  101.   -42- How can I run 'xinit' manually, rather than automatically from
  102.        'xdm'?
  103.   -43- How can I start X on a remote host with no users logged in?
  104.   -44- IMAGE FILES
  105.   -45- How can I convert images to and from other formats?
  106.   -46- What is the format of SGI's RGB files?
  107.   -47- How can I compress RGB bitmaps?
  108.   -48- How can I make a screen dump?
  109.   -49- PROGRAMMING
  110.   -50- Can I use 4Dgifts code in my application?
  111.   -51- What does ERR_WMANIPC mean?
  112.   -52- How can I translate screen (x,y) coords into world (x,y,z)
  113.        coords?
  114.   -53- How can I translate world (x,y,z) coords into screen (x,y)
  115.        coords?
  116.   -54- Why does nothing happen when I call mapcolor(index, R, G, B)?
  117.   -55- What's wrong with blink() in IRIX 4.0.x?
  118.   -56- Why can't 'cc' find some standard Xwindows functions?
  119.   -57- Where is the library /usr/lib/libgl_s.a for my R4000 Indigo
  120.        running IRIX 4.0.5F?
  121.   -58- What is a GL widget?
  122.   -59- I'm using the GlxMDraw widget and it doesn't seem that colors are
  123.        being installed correctly.  Overlays in the GlxMDraw widget are
  124.        displayed in red and gray instead of the colors I specify.
  125.        What's wrong?
  126.   -60- Is there a way to switch between single and double buffering
  127.        within a GL widget on the fly?
  128.   -61- Why doesn't my X server use backing store? How can I turn it on?
  129.   -62- What is "/dev/tport" used for?
  130.   -63- BUGS AND PROBLEMS
  131.   -64- Why do I get a "Broken Pipe" error when I close an X client
  132.        window?
  133.   -65- What do the errors in my 'xdm-errors' file mean?
  134.   -66- Why doesn't SGI's xlock lock my screen?
  135.   -67- Sun XView applications like "mailtool" hang my X server in IRIX
  136.        4.0.5.  They come up fine, but when I click on them the server
  137.        freezes.
  138.   -68- Why can't I log into Pandora in IRIX 4.0.1?
  139.   -69- Pandora won't come up, and /usr/adm/SYSLOG says "helvetica font
  140.        missing"
  141.   -70- Why does the X server sometimes abort when I log out in IRIX
  142.        5.0.1 and IRIX 5.1?
  143.   -71- After running a few programs, the colors change as the cursor
  144.        moves. The colors are usually all wrong in other windows.
  145.   -72- How can I make my X Server use a 12-bit PseudoColor, 12-bit
  146.        TrueColor or 24-bit TrueColor visual by default?
  147.   -73- When I try to run UIM/X uxserverd, I get an error message saying,
  148.        "license file has been modified, cannot start the UIM/X license
  149.        server".
  150.   -74- MISCELLANEOUS
  151.   -75- What books about the X Window System and OSF/Motif do you
  152.        recommend?
  153.   -76- Does the IRIX 5.2 Magic user environment display on an X
  154.        terminal?
  155.   -77- What about OpenGL?
  156.   -78- Which SGI machines can run OpenGL now? Which will in the future?
  157.   -79- What's this about a copyright dispute over virtual desks in
  158.        Indigo Magic?
  159.  
  160. ----------------------------------------------------------------------
  161.  
  162. Subject:    -1- DISPLAYS AND DGL
  163. Date: + 15 May 94 00:00:01 EST
  164.  
  165.   This section discusses how to use remote displays.
  166.  
  167. ------------------------------
  168.  
  169. Subject:    -2- How can I run a program on one machine and display it on
  170.                 another?
  171. Date: 07 May 93 00:00:01 EST
  172.  
  173.   Use the DISPLAY environment variable to specify the remote host on
  174.   which you want the X client to be displayed, then run the
  175.   application.
  176.  
  177.   To specify the remote host,
  178.  
  179.       setenv DISPLAY <destination>:0
  180.  
  181.   where <destination> is the name or IP address of the remote host.  To
  182.   specify the local host (console),
  183.  
  184.       setenv DISPLAY :0
  185.  
  186. ------------------------------
  187.  
  188. Subject:    -3- Does the DISPLAY environment variable work for GL
  189.                 applications?
  190. Date: 07 May 93 00:00:01 EST
  191.  
  192.   Yes: IRIX 4.0.x and later uses the Distributed Graphics Library (DGL)
  193.   by default. DGL applications use the DISPLAY environment variable
  194.   just as do ordinary X applications.
  195.  
  196. ------------------------------
  197.  
  198. Subject:    -4- Why doesn't the DISPLAY environment variable seem to
  199.                 work?
  200. Date: 07 May 93 00:00:01 EST
  201.  
  202.   First, make sure your DISPLAY variable is syntactically correct.  For
  203.   example, to display applications on a machine named "enterprise",
  204.   whose IP address is 123.45.678.90, DISPLAY should be set to
  205.   "enterprise:0" or "123.45.678.90:0".
  206.  
  207.   Next, try to "ping" the machine to which your DISPLAY variable is
  208.   set.  If this does not work, you have either specified an invalid
  209.   hostname, the host is down, or you are having network problems.
  210.  
  211.   If you see messages like "permission denied" or "can't connect to
  212.   server", you have a permission problem.   Do 'xhost +yourmachine' on
  213.   the remote machine to give 'yourmachine' access to the remote
  214.   machine's display. (Note that 'xhost' is inactive by default on
  215.   SGIs.)
  216.  
  217.   If you're using NIS (YP), make sure the client is linked with
  218.   "-lsun".
  219.  
  220.   For more information see Chapter 3 of the X Window System User's
  221.   Guide.
  222.  
  223. ------------------------------
  224.  
  225. Subject:    -5- Why do I get DGL errors when I try to run a GL program?
  226. Date: 20 Feb 94 00:00:01 EST
  227.  
  228.   - There may be a problem with the DISPLAY variable or Xwindows
  229.     permissions. See the previous question.
  230.  
  231.   - You may be trying to display on a non-SGI machine which doesn't
  232.     have GL/DGL. (Most don't, yet.) Presently the only way around this
  233.     is to buy a third-party GL emulator for the non-SGI machine.
  234.  
  235.   - DGL may be disabled in /etc/services and/or /etc/inetd.conf. The
  236.     former file should have a line reading
  237.  
  238.       sgi-dgl         5232/tcp
  239.  
  240.     and the latter should have a line reading
  241.  
  242.       sgi-dgl stream  tcp   nowait  root   /usr/etc/dgld  dgld -IM -tDGLTSOCKET
  243.  
  244.     If either is commented out, remove the comment.
  245.  
  246.   - You may be trying to display on a machine with a much older version
  247.     of IRIX. Try another machine with a newer IRIX.
  248.  
  249.   An article in the Jan/Feb 93 Pipeline describes the above in great
  250.   detail.
  251.  
  252. ------------------------------
  253.  
  254. Subject:    -6- CUSTOMIZING
  255. Date: 15 May 94 00:00:01 EST
  256.  
  257.   This section discusses ways to customize your environment, both with
  258.   and without graphics. The next two sections go into depth on
  259.   customizing Xwindows resources and the 4Dwm.
  260.  
  261. ------------------------------
  262.  
  263. Subject:    -7- What tools does SGI provide to help with the
  264.                 customization process?
  265. Date: 05 Jul 94 00:00:01 EST
  266.  
  267.   Here are some good places to look in IRIX 4.0.x:
  268.  
  269.   - The Customization rollover menu in the Toolchest.
  270.   - The manpages for xfontsel, xlsfonts, xwininfo, xdpyinfo, xprop,
  271.     appres, listres, and xrdb.
  272.   - The "WorkSpace User's Guide".
  273.   - The example files in /usr/tutor/Customize.
  274.  
  275.   In IRIX 5.x, take the systemtour and keep your eyes open.
  276.  
  277. ------------------------------
  278.  
  279. Subject:    -8- What are the important login and resource files for IRIX
  280.                 4.0.x?
  281. Date: 07 May 93 00:00:01 EST
  282.  
  283.   The following three file groupings indicate where files that affect
  284.   your login session reside.
  285.  
  286.   1) /usr/lib/X11/* - This is THE starting place. Here you find the
  287.   system default bindings for Motif, 4Dwm, and the Toolchest. The xdm
  288.   directory lives here as well as the app-defaults directory. xdm
  289.   controls the session management. Many application defaults are set in
  290.   the app-defaults directory.
  291.  
  292.   2) $HOME/[.Xdefaults, .4Dwmrc, .chestrc, .xsession, .sgisession] Here
  293.   you find the files that control your system set-up.  You create these
  294.   files; they don't exist when you first log in.
  295.  
  296.   3) /usr/bin/X11 - This is where the binaries live. It makes life nice
  297.   to include this directory in your path.
  298.  
  299. ------------------------------
  300.  
  301. Subject:    -9- What is the sequence of events that occur at login time
  302.                 in IRIX 4.0.x?
  303. Date: 10 Dec 93 00:00:01 EST
  304.  
  305.   This is a bare bones synopsis of the events that occur when you log
  306.   in to the console via xdm (the default method of logging in) under
  307.   IRIX 4.0.x and, with the desktop *disabled*, IRIX 5.x.
  308.  
  309.    1) Provide a "failsafe" (nographics) login if required/requested.
  310.    2) Exec $HOME/.xsession if it exists. If it exists, the remaining
  311.       steps should normally be included in the users .xsession file
  312.       as well.
  313.    3) Load $HOME/.Xresources if it exists.
  314.    4) Set XUSERFILESEARCHPATH.
  315.    5) Incorporate a "shell" environment into the "session".
  316.       (man userenv)
  317.    6) Set the root background and cursor.
  318.    7) Disable display access control (xhost +).  (man xhost)
  319.    8) Start 4Dwm.
  320.    9) Wait for 4Dwm to come up.
  321.   10) Start the console.
  322.   11) Execute $HOME/.sgisession if it exists.
  323.   12) Start WorkSpace if the user wants it.
  324.   13) Put a Toolchest on each screen.
  325.   14) Exec the "reaper". (man reaper / endsession)
  326.  
  327. ------------------------------
  328.  
  329. Subject:   -10- What is the difference between .xsession and .sgisession
  330.                 in IRIX 4.0.x?
  331. Date: 07 May 93 00:00:01 EST
  332.  
  333.   The system Xsession file (/usr/lib/X11/xdm/Xsession or
  334.   Xsession-remote) starts up a number of important things when you log
  335.   in, eg. 4Dwm, toolchest, loads resources, sets your
  336.   XUSERFILESEARCHPATH, sets your root background, etc.
  337.  
  338.   One of the last things it does is look in your home directory for a
  339.   .sgisession file.  This allows you to start additional programs at
  340.   login time. This is the file that you would use to start a mailbox,
  341.   additional window, a calendar, etc.
  342.  
  343.   ADVANTAGES OF $HOME/.sgisession :
  344.  
  345.       1) You don't need to read through yet another system file to see
  346.      what you need or don't need.
  347.  
  348.   DISADVANTAGES OF $HOME/.sgisession :
  349.  
  350.       1) You cannot override ALL of the defaults set for you. Some
  351.          things you can't change from a .sgisession file:
  352.  
  353.          A) You can't start a different window manager.
  354.          B) You can't change the way the console starts.
  355.          C) You can't change toolchest output redirection to
  356.         the console.
  357.  
  358.       2) Users of other vendors' equipment are used to seeing a
  359.      .xsession file.
  360.  
  361.   After checking for a "failsafe" (ie. no graphics) login, one of the
  362.   first things that /usr/lib/X11/xdm/Xsession does is check for
  363.   $HOME/.xsession.  If it exists, Xsession execs your .xsession file.
  364.   This means that if you are REALLY sure you know what you are doing,
  365.   you can log in with a different window manager, xterm as a console,
  366.   or xwsh not already iconified, etc.  You can also turn off the
  367.   toolchest output redirection, and start anything else you might have
  368.   done in $HOME/.sgisession. There is a discussion on xsession files in
  369.   volume 3 of the O'Reilly series.
  370.  
  371. ------------------------------
  372.  
  373. Subject:   -11- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
  374.                 environment variable I set in my shell's startup files
  375.                 in IRIX 4.0.x?
  376. Date: 30 Apr 94 00:00:01 EST
  377.  
  378.   The script /usr/lib/X11/xdm/Xsession (or, if you have one, your own
  379.   ~/.xsession) runs when you log in and starts your window manager
  380.   (4Dwm), Workspace, etc. To give these programs a copy of the
  381.   environment you define in your shell's startup files, Xsession first
  382.   runs 'userenv', which runs your shell just to see what environment
  383.   variables your shell's startup files set and puts them into
  384.   Xsession's environment.  Later on Xsession runs 4Dwm, Workspace, etc.
  385.   and they inherit Xsession's environment including the environment
  386.   variables which 'userenv' got from your shell's startup files.
  387.  
  388.   However, 'userenv' objects to 1) errors in your shell startup files,
  389.   2) commands which print output to the terminal and 3) commands like
  390.   'stty' and 'tset', which expect to be connected to a terminal.  Any
  391.   of these may cause 'userenv' to give up completely, so that Xsession,
  392.   4Dwm, Workspace, etc. do not get any of your shell's enviroment.
  393.  
  394.   To get 'userenv' to work, you must 1) make sure that your shell
  395.   startup files are error-free and 2) protect 'userenv' from commands
  396.   which print output or expect to be connected to a terminal by testing
  397.   for the ENVONLY environment variable before running them. (See the
  398.   userenv(1) manpage.) You might try disabling your shell startup files
  399.   (or parts thereof) one by one to narrow down which is causing the
  400.   problem.  Be sure to check both personal and system-wide shell
  401.   startup files! See your shell's manpage for a complete list.
  402.  
  403.   Note that each terminal window (aka 'winterm', 'xwsh' or 'xterm')
  404.   runs a fresh copy of your shell, so it has a second chance to set
  405.   your environment variables. Your shell is now connected to a terminal
  406.   and 'userenv' isn't involved, so none of the above problems apply.
  407.   The environment in a terminal window will appear correct, and
  408.   programs started from a window (e.g. by typing 'workspace' to start
  409.   Workspace) will inherit the environment properly.  Furthermore,
  410.   'userenv' often appears to work when run inside a terminal window,
  411.   even when it does not work when run from Xsession.  This is all fine,
  412.   but it doesn't help when you log in. One right way to see if
  413.   'userenv' is working when it should is to add the line 'env >
  414.   $HOME/test-userenv' to Xsession after the line that runs 'userenv',
  415.   log in and examine the file it creates.
  416.  
  417.   'bash' users take note: 'bash' has particular problems with
  418.   'userenv', and there is a special version of 'userenv' which works
  419.   with 'bash' at
  420.   viz.tamu.edu:/pub/sgi/software/userenv/userenv.tar.gz.
  421.  
  422. ------------------------------
  423.  
  424. Subject:   -12- How can I save my screen layout in IRIX 4.0.x?
  425. Date: 07 May 93 00:00:01 EST
  426.  
  427.   Not very easily.  You must run "xwininfo" to find the X and Y
  428.   position of each window, then use that information to customize your
  429.   .sgisession or .xsession files.
  430.  
  431.   For more information see Chapter 3 of the X Window System User's
  432.   Guide, (Vol. 3 of the O'Reilly series)
  433.  
  434.   There are two tools that may help: 'xtoolplaces', which was posted to
  435.   volume 14 of comp.sources.x
  436.   (ftp.uu.net:/usenet/comp.sources.x/volume14/xtoolplaces/), and David
  437.   Hinds' 'xscript', which is at cb-iris.stanford.edu:/pub/.
  438.  
  439. ------------------------------
  440.  
  441. Subject:   -13- How can I turn off the IRIX 5.2 Magic user environment?
  442. Date: 18 Aug 94 00:00:01 EST
  443.  
  444.   Mark Andrews <mark@alias.com> says:
  445.   You can disable the Indigo Magic environment in two ways:
  446.  
  447.   1) If you wish to disable it for all users on the machine:
  448.  
  449.          chkconfig desktop off
  450.  
  451.   2) If you wish to disable it for a specific user, do
  452.  
  453.          touch ~<username>/.disableDesktop
  454.  
  455.      You may also have to remove the ~/.desktop-<hostname> directory as
  456.      well as 4Dwm looks in there for a 4Dwmsession file which it uses
  457.      for a guide to redisplay windows left open from the last session.
  458.  
  459.      Method 2 works ONLY if you have the original IRIX 5.2 xdm Xsession
  460.      file, which contains the following code chunk:
  461.  
  462.      if /etc/chkconfig desktop ;
  463.      then
  464.              if [ -x $0.dt -a \! -f $HOME/.disableDesktop ]
  465.              then
  466.                      exec $0.dt $*
  467.              fi
  468.      fi
  469.  
  470.   If you only want to turn off the file manager, create the file
  471.   ~/.desktop-<hostname>/nodesktop.
  472.  
  473.   Whether you disable the entire desktop or just the file manager, you
  474.   may also want to set one or more of these resources
  475.  
  476.      4DWm*SG_autoSave:       false
  477.      4Dwm*SG_manageSession:  false
  478.      4Dwm*SG_useBackgrounds: false
  479.  
  480.   which are explained in the 4Dwm(1) manpage. See also the desktop_eoe
  481.   release notes.
  482.  
  483. ------------------------------
  484.  
  485. Subject:   -14- Where is the default value of PATH set?
  486. Date: 10 Dec 93 00:00:01 EST
  487.  
  488.   Every program which allows a user to log in (telnet, rlogin, pandora,
  489.   etc.) can specify PATH. Shells may as well if it isn't already set.
  490.   There are many slightly different default values, and relying on them
  491.   is a good way to get confused. The only reliable method is to set
  492.   PATH in your shell's startup files. These are different for each
  493.   shell, and are described in each shell's manpage. Beware of 'ksh',
  494.   which has an internal, invisible default path ('/bin:/usr/bin') which
  495.   it uses when PATH is not set.
  496.  
  497. ------------------------------
  498.  
  499. Subject:   -15- Why can't I log in after copying
  500.                 /usr/lib/X11/xdm/Xsession to .xsession?
  501. Date: 07 May 93 00:00:01 EST
  502.  
  503.   After copying this file to your home directory, you need to remove
  504.   all references to "xsession". References to xsession cause the system
  505.   to try to execute $HOME/.xsession, which will create an infinite
  506.   loop.
  507.  
  508.   Remove the lines in ~/.xsession that say:
  509.  
  510.   if [ -r $xsession -a "$0" != $xsession ]; then
  511.          if [ -x $xsession ]; then
  512.              exec $xsession
  513.          else
  514.              exec /bin/sh $xsession
  515.          fi
  516.   fi
  517.  
  518. ------------------------------
  519.  
  520. Subject:   -16- How can I find out what fonts are available?
  521. Date: 07 May 93 00:00:01 EST
  522.  
  523.   The xfontsel and xlsfonts utilities help you find appropriate fonts.
  524.   xlsfonts lists the fonts; xfontsel provides an interface for
  525.   selecting a desired font. To use xfontsel, choose "Font Names" from
  526.   the Customization rollover menu in the Toolchest.  Please see the man
  527.   pages and the IRIS Utilities Guide for further information.
  528.  
  529. ------------------------------
  530.  
  531. Subject:   -17- How can I use the Alt key as a Meta key in an xwsh
  532.                 window?
  533. Date: 23 Jun 94 00:00:01 EST
  534.  
  535.   First, put the following X resources wherever you put X resources:
  536.  
  537.   --- beginning of resources ---
  538.   ! This turns Alt-key into Meta-key.
  539.  
  540.   XWsh*metaKeyMask:    8
  541.  
  542.   ! This allows multiple key modifiers in keybindings (so we can do
  543.   ! meta-shift, meta-control, etc. and incidentally a) turns vt100
  544.   ! cursor key mode off and b) changes the cursor key bindings.
  545.  
  546.   XWsh*keyboardType:    xlib
  547.  
  548.   ! This turns vt100 cursor key mode back on. Running 'tset' at login
  549.   ! resets the terminal and turns the cursor keys back off, so don't
  550.   ! run it.
  551.  
  552.   XWsh*initSequence:    \233?1h
  553.  
  554.   ! The iris-ansi terminfo entry has arrow key sequences for the ibmrt
  555.   ! keyboard, not the xlib keyboard; for curses applications to work,
  556.   ! the arrow keys must be bound to the sequences in the terminfo
  557.   ! entry. Rebinding the arrow keys to match the terminfo entry is more
  558.   ! convenient than changing the terminfo entry.
  559.  
  560.   XWsh*ckmeKeyMap:            \
  561.       Left(any): send("\033[D");        \
  562.       Right(any): send("\033[C");        \
  563.       Up(any): send("\033[A");        \
  564.       Down(any): send("\033[B");
  565.   --- end of resources ---
  566.  
  567.   'tset' resets your terminal, so running it will undo the initSequence
  568.   resource setting. There is a 'tset' command in the default csh/tcsh
  569.   ~/.login file; replace the line
  570.  
  571.       eval `tset -s -Q`
  572.  
  573.   with
  574.  
  575.       if (! $?TERM) then
  576.           eval `tset -s -Q`
  577.       endif
  578.  
  579.   so 'tset' will run only if the TERM environment variable isn't
  580.   already set. (You can't say 'if (! $?TERM) eval `tset -sQ`', because
  581.   csh/tcsh evaluates the backquotes *before* the if.)
  582.  
  583.   Finally, if you use GNU Emacs, put the following in your .emacs:
  584.  
  585.       (set-input-mode nil nil t)
  586.  
  587.   This tells Emacs to allow Meta key usage even though the iris-ansi
  588.   (xwsh) terminal description doesn't specify a Meta key.
  589.  
  590. ------------------------------
  591.  
  592. Subject:   -18- How can I configure my keyboard like a VT100?
  593. Date: 14 Jun 94 00:00:01 EST
  594.  
  595.   'xwsh -vt100' may be close enough; try it and see. (The PF keys are
  596.   mapped to F9-F12.) If not, use 'xterm' and put the following (from
  597.   Hemant Shah <shah@fnal.fnal.gov>) wherever you put the rest of your X
  598.   resources:
  599.  
  600.   === snip ===
  601.   XTerm*VT100.Translations: #override \
  602.       <Key>BackSpace:        string(0x7f) \n\
  603.       <Key>Num_Lock:        string(0x1b) string("OP") \n\
  604.       <Key>KP_Divide:        string(0x1b) string("OQ") \n\
  605.       <Key>KP_Multiply:    string(0x1b) string("OR") \n\
  606.       <Key>KP_Subtract:    string(0x1b) string("OS") \n\
  607.       <Key>KP_Add:        string(0x1b) string("Om") \n\
  608.       <Key>Pause:        string(0x1b) string("[34~") \n\
  609.       <Key>Print:        string(0x1b) string("[32~") \n\
  610.       <Key>Scroll_Lock:       string(0x1b) string("[33~") \n\
  611.       <Key>KP_0:        string(0x1b) string("Op") \n\
  612.       <Key>KP_1:        string(0x1b) string("Oq") \n\
  613.       <Key>KP_2:        string(0x1b) string("Or") \n\
  614.       <Key>KP_3:        string(0x1b) string("Os") \n\
  615.       <Key>KP_4:        string(0x1b) string("Ot") \n\
  616.       <Key>KP_5:        string(0x1b) string("Ou") \n\
  617.       <Key>KP_6:        string(0x1b) string("Ov") \n\
  618.       <Key>KP_7:        string(0x1b) string("Ow") \n\
  619.       <Key>KP_8:        string(0x1b) string("Ox") \n\
  620.       <Key>KP_9:        string(0x1b) string("Oy") \n\
  621.       <Key>KP_Decimal:    string(0x1b) string("On") \n\
  622.       <Key>Insert:        string(0x1b) string("[1~") \n\
  623.       <Key>Home:        string(0x1b) string("[2~") \n\
  624.       <Key>Prior:        string(0x1b) string("[3~") \n\
  625.       <Key>Delete:        string(0x1b) string("[4~") \n\
  626.       <Key>End:        string(0x1b) string("[5~") \n\
  627.       <Key>Next:        string(0x1b) string("[6~") \n\
  628.       <Key>F1:        string(0x1b) string("[17~") \n\
  629.       <Key>F2:        string(0x1b) string("[18~") \n\
  630.       <Key>F3:        string(0x1b) string("[19~") \n\
  631.       <Key>F4:        string(0x1b) string("[20~") \n\
  632.       <Key>F5:        string(0x1b) string("[21~") \n\
  633.       <Key>F6:        string(0x1b) string("[23~") \n\
  634.       <Key>F7:        string(0x1b) string("[24~") \n\
  635.       <Key>F8:        string(0x1b) string("[25~") \n\
  636.       <Key>F9:        string(0x1b) string("[26~") \n\
  637.       <Key>F10:        string(0x1b) string("[28~") \n\
  638.       <Key>F11:        string(0x1b) string("[29~") \n\
  639.       <Key>F12:        string(0x1b) string("[31~") \n\
  640.   === snip ===
  641.  
  642.   This remaps the keys as follows:
  643.  
  644. ----------------------------------------------------
  645.      SGI Key              |   Emulated VT100 key
  646. ----------------------------------------------------
  647.     Num Lock              |   PF1
  648.       /                   |   PF2
  649.       *                   |   PF3
  650.       -                   |   PF4
  651.       7                   |   7
  652.       8                   |   8
  653.       9                   |   9
  654.       +                   |   -
  655.       4                   |   4
  656.       5                   |   5
  657.       6                   |   6
  658.       1                   |   1
  659.       2                   |   2
  660.       3                   |   3
  661.     Enter                 |   Enter
  662.       0                   |   0
  663.       .                   |   .
  664.     Insert                |   Find
  665.     Home                  |   Insert Here
  666.     Page Up               |   Remove
  667.     Delete                |   Select
  668.     End                   |   Prev Screen
  669.     Page Down             |   Next Screen
  670.       F1                  |   F6
  671.       F2                  |   F7
  672.       F3                  |   F8
  673.       F4                  |   F9
  674.       F5                  |   F10
  675.       F6                  |   F11
  676.       F7                  |   F12
  677.       F8                  |   F13
  678.       F9                  |   F14
  679.       F10                 |   Help
  680.       F11                 |   Do
  681.       F12                 |   F17
  682.     Print Screen          |   F18
  683.     Scroll Lock           |   F19
  684.     Pause                 |   F20
  685.  
  686.   Any volunteers to work out similar bindings for xwsh?
  687.  
  688. ------------------------------
  689.  
  690. Subject:   -19- RESOURCES
  691. Date: + 15 May 94 00:00:01 EST
  692.  
  693.   This section discusses Xwindows resources.
  694.  
  695. ------------------------------
  696.  
  697. Subject:   -20- What are resources?
  698. Date: 07 May 93 00:00:01 EST
  699.  
  700.   Resources are "attributes" that control the look and feel of an
  701.   application. Resources include color, fonts, size, location, and
  702.   more.  Resources can have a complex format for binding strengths.
  703.  
  704.   For a complete description of resources, including a description of
  705.   "loose" and "tight" bindings, consult a book listed in the
  706.   bibliography question above.
  707.  
  708. ------------------------------
  709.  
  710. Subject:   -21- How can I set resources?
  711. Date: 07 May 93 00:00:01 EST
  712.  
  713.   There are many ways to set resources. Resources may be listed in
  714.   files or contained in a data base. Consult a book on X as well as the
  715.   xrdb(1) manpage for detailed descriptions.  Generally speaking, if
  716.   xrdb is not used, resource files are specified through environment
  717.   variables.  "What is a good approach to take in looking for
  718.   resources?" addresses the precedence of these files and variables.
  719.  
  720.   For some examples in IRIX 4.0.x, see the file
  721.   /usr/tutor/Customize/example.Xdefaults.
  722.  
  723. ------------------------------
  724.  
  725. Subject:   -22- How can I use resources to run the same program twice
  726.                 with different attributes?
  727. Date: 07 May 93 00:00:01 EST
  728.  
  729.   To accomplish this task, you need to take advantage of the "instance
  730.   vs class" concept. This concept is explained further in most books on
  731.   Xt.
  732.  
  733.   Many applications have a resource that lets you to give it a unique
  734.   name.  For example, from the xwsh man page :
  735.  
  736.   -name instance-name
  737.     Provide a unique name for an xwsh window.  This name becomes
  738.     the instance name of the specific xwsh, with the class name
  739.     always being "XWsh".
  740.  
  741.   Using the -name option allows you to give "names" to different
  742.   instances of xwsh and assign different resources to each one.  So if
  743.   you want two different xwsh's with different resource sets, give them
  744.   two different names, say howdymom and howdydoody, for example.  Add
  745.   the following to your ~/.Xdefaults file (if you use .Xdefaults) :
  746.  
  747.     howdymom*foreground:       SeaGreen
  748.     howdydoody*foreground:     SGIBeet
  749.  
  750.   Now all you have to do is start them up :
  751.  
  752.     xwsh -name howdymom&
  753.     xwsh -name howdydoody&
  754.  
  755. ------------------------------
  756.  
  757. Subject:   -23- Does the GL recognize resources?
  758. Date: 07 May 93 00:00:01 EST
  759.  
  760.   Yes. In IRIX 4.0 and later, the GL responds to several X resources,
  761.   allowing run-time control over some aspects of GL programs.
  762.  
  763.   The man page assumes you are somewhat familiar with X resources, if
  764.   you are not, you should read some X documentation such as Volume 3 of
  765.   the O'Reily X books.
  766.  
  767.   The GL uses resources names with the prefixes
  768.  
  769.     appname.gl.                (instance prefix)
  770.     Appname.GL.                (class prefix)
  771.  
  772.   where appname and Appname are derived from the argument to the GL
  773.   program's first call to winopen(3G) upper case.
  774.  
  775.   For complete information see the man page for GLRESOURCES.
  776.  
  777. ------------------------------
  778.  
  779. Subject:   -24- How can I know what resources I can set for an
  780.                 application?
  781. Date: 07 May 93 00:00:01 EST
  782.  
  783.   The most common place to find resource variables for a particular
  784.   application is in the man page for that application.
  785.  
  786.   For example, take a look at the man page for `xwsh'.  Look for the
  787.   section heading called `RESOURCES'.  This section lists each resource
  788.   for `xwsh', and in some cases, the valid values for that resource.
  789.  
  790.   Also, many major applications are built on top of the Xt toolkit.
  791.   There are standard resources that these applications recognize. For a
  792.   more complete description, see one of the books on Xt listed in the
  793.   bibliography.
  794.  
  795. ------------------------------
  796.  
  797. Subject:   -25- What is a good approach to take in looking for
  798.                 resources?
  799. Date: 07 May 93 00:00:01 EST
  800.  
  801.   The following is a recommended list  of steps to take when searching
  802.   for a resource, binding, behavior, etc.
  803.  
  804.    1) Look in the 4.0 Transition Guide.
  805.    2) Look in /usr/tutor/Customize.
  806.    3) Look in /usr/demos.
  807.    4) Look in ~4Dgifts.  (Available with the development option.)
  808.    5) If the client you are interested in is a GL client, see the
  809.       man page for GLRESOURCES.
  810.    6) Look in /usr/lib/X11/app-defaults/ClientName.
  811.    7) Look in /usr/lib/X11/system.* .
  812.    8) Look through the man page for the client you are interested in.
  813.    9) Look in O'Reilly & Associates Vol. III. It has many gems
  814.       pertaining to standard X clients.
  815.   10) Look in the documentation that came with your application.
  816.   11) Look in the OSF Motif manuals.
  817.   12) Post to comp.windows.x if you can not find
  818.       an answer using steps 1 through 11.
  819.  
  820. ------------------------------
  821.  
  822. Subject:   -26- What is the precedence for resource files?
  823. Date: 07 May 93 00:00:01 EST
  824.  
  825.   The following list indicates the weight of set resources.
  826.   Items at the top have the greatest weight.
  827.  
  828.   1) Hard coded values for resources.
  829.   2) Command line arguments.
  830.   3) Resources pointed to by $XENVIRONMENT.
  831.   4) Resource values loaded into the Resource Data Base via xrdb.
  832.   5) Resources pointed to by other environment variables :
  833.  
  834.      IF $XUSERFILESEARCHPATH is set
  835.  
  836.        then it contains a list of directories to search.
  837.  
  838.      ELSE IF $XAPPLRESDIR is set
  839.  
  840.        it contains a single directory, and a short list of related
  841.        directories (e.g. adjusted for language) is where resource files
  842.        must be found.
  843.  
  844.      ELSE
  845.  
  846.        Look in a short list of places related to $HOME (e.g. language
  847.        adjusted). This includes files in $HOME that have the name of
  848.        the class of the application.
  849.  
  850.   6) Resource values set in $HOME/.Xdefaults, provided that the
  851.      RESOURCE_MANAGER property hasn't been set via the xrdb command.
  852.      (see the third paragraph in the xrdb man page)
  853.   7) Values set in /usr/lib/X11/app-defaults/*.
  854.   8) Values set through through the application's fall back mechanism.
  855.  
  856. ------------------------------
  857.  
  858. Subject:   -27- Why do long resources cause X to crash mysteriously in
  859.                 IRIX 5.2?
  860. Date: 13 Nov 94 00:00:01 EST
  861.  
  862.   Get patch 36 from the TAC.
  863.  
  864. ------------------------------
  865.  
  866. Subject:   -28- 4DWM
  867. Date: 15 May 94 00:00:01 EST
  868.  
  869.   This section discusses the 4D Window Manager.
  870.  
  871. ------------------------------
  872.  
  873. Subject:   -29- Where can I learn more about the Window Manager?
  874. Date: 07 May 93 00:00:01 EST
  875.  
  876.   The man pages for 4Dwm and mwm contain a wealth of information on the
  877.   window manager. There are also online files. You may want to read
  878.   /usr/tutor/Customize/example.4Dwmrc (IRIX 4.0.x only) as well as
  879.   /usr/people/4Dgifts/.4Dwmrc (if you have the IDO option).  The
  880.   OSF/Motif manuals listed in the bibliography are also good places to
  881.   find information. (4Dwm is based on mwm).
  882.  
  883. ------------------------------
  884.  
  885. Subject:   -30- What files affect the window manager and what is their
  886.                 relationship to each other?
  887. Date: 07 May 93 00:00:01 EST
  888.  
  889.   1) ~/.4Dwmrc, if you have one
  890.   2) /usr/lib/X11/system.4Dwmrc
  891.   3) /usr/bin/X11/4Dwm
  892.   4) /usr/lib/X11/app-defaults/4Dwm
  893.   5) ~/.Xdefaults (or wherever you set resources)
  894.  
  895.   When 4Dwm is started, it looks for ~/.4Dwmrc. If it does not exist,
  896.   it looks at /usr/lib/X11/system.4Dwmrc. The definitions for button
  897.   bindings, menus, etc are contained in these files. For a better
  898.   description of bindings, look in /usr/tutor/Customize/example.4Dwmrc
  899.   and /usr/people/ 4Dgifts/.4Dwmrc. Also see the man pages for 4Dwm.
  900.  
  901.   The resource set for the bindings will actually "choose" which
  902.   binding definition is set.
  903.  
  904. ------------------------------
  905.  
  906. Subject:   -31- Do I need my own .4Dwmrc file?
  907. Date: 07 May 93 00:00:01 EST
  908.  
  909.   Not necessarily. As mentioned in the previous question, actual
  910.   bindings are determined by resource names. If there is a binding
  911.   definition in /usr/lib/X11/system.4Dwmrc that you like, you may
  912.   choose it by setting the appropriate resource.
  913.  
  914. ------------------------------
  915.  
  916. Subject:   -32- Can I run a different window manager?
  917. Date: 07 May 93 00:00:01 EST
  918.  
  919.   IRIX has 4Dwm, mwm, twm, and uwm. However, GL programs are guaranteed
  920.   to work only under 4Dwm.
  921.  
  922. ------------------------------
  923.  
  924. Subject:   -33- How can I choose a different window manager as the
  925.                 default?
  926. Date: 07 May 93 00:00:01 EST
  927.  
  928.   You must use a .xsession file and explicitly invoke the window
  929.   manager and any other applications you want to use, such as
  930.   'toolchest' and 'xwsh'.
  931.  
  932.   After making this change, you may only be able to log out by using
  933.   the "Log Out" selection in the toolchest, or by executing
  934.   /usr/bin/X11/endsession.
  935.  
  936.   Here are the contents of a sample .xsession file:
  937.  
  938.       xhost + &
  939.       toolchest -name ToolChest > /dev/console 2&>1 &
  940.       winterm -bg red &
  941.       winterm -bg blue &
  942.       mwm > /dev/console 2&>1 &
  943.       /usr/bin/X11/reaper
  944.  
  945.   Note that 'reaper' is not put into the background.  When 'reaper'
  946.   exits you will be logged out.
  947.  
  948.   Alternatively, you can do the following steps:
  949.  
  950.   1. cp /usr/lib/X11/xdm/Xsession ~/.xsession
  951.  
  952.   2. Remove the lines in ~/.xsession that say:
  953.  
  954.      if [ -r $xsession -a "$0" != $xsession ]; then
  955.       if [ -x $xsession ]; then
  956.           exec $xsession
  957.       else
  958.           exec /bin/sh $xsession
  959.       fi
  960.      fi
  961.  
  962.   3. Change the line that says
  963.  
  964.      /usr/bin/X11/4Dwm >/dev/console 2>&1 &
  965.  
  966.      to
  967.  
  968.      /usr/bin/X11/mwm > /dev/console 2>&1 &
  969.  
  970. ------------------------------
  971.  
  972. Subject:   -34- How can I recover from a failed window manager
  973.                 customization attempt?
  974. Date: 07 May 93 00:00:01 EST
  975.  
  976.   If your attempt at customization leaves you in a state where buttons
  977.   and menus are no longer recognized, you can recover by pressing the
  978.   <Alt><CTRL><Shift><!>keys simultaneously. A menu appears that will
  979.   let you choose Motif, Iris, or user defaults. Choose either Motif or
  980.   Iris defaults and then push OK. This restarts the window manager to a
  981.   usable state.
  982.  
  983. ------------------------------
  984.  
  985. Subject:   -35- Why is an extra 4Dwm burning CPU in IRIX 4.0.x?
  986. Date: 07 May 93 00:00:01 EST
  987.  
  988.   This multiple window manager problem is usually triggered by the
  989.   "kill" feedback of the window manager when a user logs out.  The
  990.   workaround for the problem is to remove the "kill" feedback.
  991.  
  992.   The "kill" feedback is controlled by the resource "showFeedback."
  993.   For 4Dwm, this resource is defined in /usr/lib/X11/app-defaults/4DWm
  994.   as:
  995.  
  996.     *showFeedback:       behavior restart quit kill
  997.  
  998.   Modify the resource to read:
  999.  
  1000.     *showFeedback:       behavior restart quit
  1001.  
  1002.   For mwm, set a "showFeedback" resource that does not include the
  1003.   "kill" feedback in /usr/lib/X11/app-defaults/Mwm.  A sample setting
  1004.   is:
  1005.  
  1006.     Mwm*showFeedback:  move placement resize behavior restart quit
  1007.  
  1008. ------------------------------
  1009.  
  1010. Subject:   -36- Why doesn't the window manager's "Log Out" routine work
  1011.                 in IRIX 4.0.5?
  1012. Date: 09 Jan 94 00:00:01 CST
  1013.  
  1014.   "Log Out" runs 'endsession', which under some versions of IRIX 4.0.5
  1015.   does not work if your hostname contains a number. Fortunately,
  1016.   'endsession' is a script, and you can fix it by changing the line
  1017.  
  1018.       PROP_DISPLAY=`expr $DISPLAY : '\(.*\).[1-9]' \| $DISPLAY`
  1019.  
  1020.   to
  1021.  
  1022.       PROP_DISPLAY=`expr $DISPLAY : '\(.*\)\.[1-9]' \| $DISPLAY`
  1023.  
  1024.   i.e. just add a backslash before the second period.
  1025.  
  1026. ------------------------------
  1027.  
  1028. Subject:   -37- ADMINISTRATION
  1029. Date: 15 May 94 00:00:01 EST
  1030.  
  1031.   This section describes how to start and stop parts of the graphics
  1032.   system in various funky ways.
  1033.  
  1034. ------------------------------
  1035.  
  1036. Subject:   -38- How can I log into pandora/clogin without bringing up
  1037.                 graphics?
  1038. Date: 07 May 93 00:00:01 EST
  1039.  
  1040.   Add the magic word 'failsafe' after your username. E.g. to log in as
  1041.   root without graphics, you'd type 'root failsafe', whack Enter, and
  1042.   type your password.
  1043.  
  1044. ------------------------------
  1045.  
  1046. Subject:   -39- How can I restart the console?
  1047. Date: 07 May 93 00:00:01 EST
  1048.  
  1049.   Use /usr/sbin/startconsole. 'startconsole' and 'winterm' (which
  1050.   'startconsole' calls) are scripts, so you can see how they do it.
  1051.  
  1052. ------------------------------
  1053.  
  1054. Subject:   -40- How can I start and stop the graphics system?
  1055. Date: 07 May 93 00:00:01 EST
  1056.  
  1057.   Use /usr/gfx/startgfx and /usr/gfx/stopgfx.  Be aware that stopgfx
  1058.   will kill any active windows and log you out.
  1059.  
  1060. ------------------------------
  1061.  
  1062. Subject:   -41- How can I kill the X server without logging in or
  1063.                 rebooting?
  1064. Date: 22 Jan 94 00:00:01 EST
  1065.  
  1066.   Hold down the left-Control, left-Shift, F12 and keypad slash keys.
  1067.   This is fondly known as the "Vulcan Death Grip".
  1068.  
  1069. ------------------------------
  1070.  
  1071. Subject:   -42- How can I run 'xinit' manually, rather than
  1072.                 automatically from 'xdm'?
  1073. Date: 07 May 93 00:00:01 EST
  1074.  
  1075.   By doing the following, which will affect all users:
  1076.  
  1077.   1) log in as root
  1078.   2) Type:
  1079.      /usr/gfx/stopgfx
  1080.      chkconfig xdm off.
  1081.  
  1082.   3) all users need to copy /usr/bin/X11/X to their home directory
  1083.      (renaming the file to .xserverrc), removing the if test for
  1084.      windowsystem, OR be familiar enough with xinit to have an
  1085.      alternate command line.
  1086.   4) transfer all startup programs from .xsession/.sgisession to
  1087.      .xinitrc.
  1088.   5) the last program to start from .xinitrc must not exit.  When this
  1089.      one exits, the session terminates.
  1090.  
  1091. ------------------------------
  1092.  
  1093. Subject:   -43- How can I start X on a remote host with no users logged
  1094.                 in?
  1095. Date: 07 May 93 00:00:01 EST
  1096.  
  1097.   This example starts up an xclock on the remote system.  The easy way
  1098.   to test this for now is to rlogin to the system and type the
  1099.   commands.  Once something works you can write some shell scripts and
  1100.   use rsh to run them:
  1101.  
  1102.   hydra is being used to login to oscar and start graphics on oscar.
  1103.   oscar is displaying the pandora login when this is done:
  1104.  
  1105.   hydra 2% rlogin oscar -l root
  1106.   oscar 1# /usr/gfx/stopgfx     (screen blanks)
  1107.   oscar 2# chkconfig windowsystem on
  1108.   oscar 3# setenv DISPLAY :0.0  (display on local screen)
  1109.   oscar 4# /usr/bin/X11/X &  (start Xsgi)
  1110.   oscar 5# xclock &  (clock is displayed)
  1111.  
  1112.   To clean up:
  1113.  
  1114.   oscar 6# /usr/gfx/stopgfx     (screen blanks)
  1115.   oscar 7# /usr/gfx/startgfx  (re-start pandora)
  1116.  
  1117. ------------------------------
  1118.  
  1119. Subject:   -44- IMAGE FILES
  1120. Date: 15 May 94 00:00:01 EST
  1121.  
  1122.   This section discusses image files and formats.
  1123.  
  1124. ------------------------------
  1125.  
  1126. Subject:   -45- How can I convert images to and from other formats?
  1127. Date: 23 Jan 95 00:00:01 EST
  1128.  
  1129.   IRIX comes with several tools which convert images to or from SGI's
  1130.   RGB format.  The executables are part of the eoe2.sw.imagetools
  1131.   subsystem, and include:
  1132.  
  1133.   fromalias - convert an Alias image to an IRIS image
  1134.   frombin - create an RGB IRIS image file from a binary dump of image data
  1135.   fromcmap - convert a color map into an image with one scanline
  1136.   fromcube - convert a Cubicomp/Vertigo image file to IRIS format
  1137.   fromdi - convert an old .di dithered image into an IRIS image
  1138.   fromface - convert a UNIX faceserver image into an IRIS image
  1139.   fromgif - convert a GIF image into an IRIS image
  1140.   frommac - convert a MacPaint image into an IRIS image
  1141.   frompic - convert a MOVIE BYU .PIC image to an IRIS image
  1142.   fromppm - convert an image in Jef Poskanzer's format into an IRIS image
  1143.   fromrla - convert a Wavefront image to an IRIS image
  1144.   fromsun - convert a sun image into an IRIS image
  1145.   fromtarga - convert a targa image into an IRIS image
  1146.   fromxbm - convert an X Bitmap image into an IRIS image
  1147.   fromxud - convert an xwd file into an IRIS image
  1148.   fromxwd - convert an xwd file into an IRIS image
  1149.   fromyuv - convert an Abekas yuv image into an IRIS image
  1150.   toalias - convert an IRIS image to an Alias image
  1151.   toascii - convert an IRIS image to text characters
  1152.   tobin - convert an IRIS image to binary dump of pixel data
  1153.   tobw - convert an IRIS image to black and white
  1154.   togif - convert an IRIS image to a Compuserve GIF image
  1155.   tomac - convert an IRIS image to MacPaint format
  1156.   tonews - convert an IRIS image into NeWS format
  1157.   topict - convert an IRIS image to Macintosh PICT format
  1158.   toppm - convert an IRIS image file into Jef Poskanzer's ppm image format
  1159.   tops - convert an IRIS image to PostScript
  1160.   toscitex - Convert IRIS images into Scitex CT2T images
  1161.   tosun - convert an IRIS image to a sun raster file
  1162.   totarga - convert an IRIS image to a type 2 targa image
  1163.   toyuv - convert an IRIS image to yuv format
  1164.  
  1165.   The source for each of these tools is in the 4Dgifts
  1166.   dev.dev_sw.giftsfull subsystem and placed in the directory
  1167.   /usr/people/4Dgifts/iristools/imgtools.  Each also has a manpage.
  1168.  
  1169.   Similar tools for more formats ('frompict', 'frompixar', 'fromtiff',
  1170.   'fromutah', 'totiff', 'toutah' and 'toxbm' at last count), as well as
  1171.   some which come with IRIX and a few miscellaneous cool image editing
  1172.   tools, are in ftp.sgi.com:/graphics/bin/. 'fromjpeg' and 'tojpeg' can
  1173.   be found in ftp.clr.toronto.edu:/pub/sgi/sgijpeg/.
  1174.   swedishchef.lerc.nasa.gov:/ has 'fromvicar' in
  1175.   /image/conversion/from/, 'tocolps' and 'topcl' in
  1176.   /image/conversion/to/ and many other image- related tools in nearby
  1177.   directories.
  1178.  
  1179.   Finally, 'imgworks' (in the imgtools.sw.tools subsystem) understands
  1180.   RGB, TIFF and FIT formats, and several freeware programs including
  1181.   SDSC's 'imtools' (in
  1182.   ftp.sdsc.edu:/pub/sdsc/graphics/imtools/sgi_4d/), 'xv' (in
  1183.   ftp.cis.upenn.edu:/pub/xv/) and ImageMagick (in
  1184.   ftp.x.org:/contrib/applications/ImageMagick/) work on SGIs and
  1185.   understand SGI's RGB format as well as many other formats.
  1186.  
  1187. ------------------------------
  1188.  
  1189. Subject:   -46- What is the format of SGI's RGB files?
  1190. Date: 30 Apr 94 00:00:01 EST
  1191.  
  1192.   Read ftp.sgi.com:/graphics/SGIIMAGESPEC.
  1193.  
  1194. ------------------------------
  1195.  
  1196. Subject:   -47- How can I compress RGB bitmaps?
  1197. Date: 07 May 93 00:00:01 EST
  1198.  
  1199.   Use /usr/sbin/rle, which is part of eoe2.sw.imagetools.
  1200.  
  1201. ------------------------------
  1202.  
  1203. Subject:   -48- How can I make a screen dump?
  1204. Date: 13 Nov 94 00:00:01 EST
  1205.  
  1206.   Use the utilities 'imgsnap' (IRIX 4.0.x only), 'scrsave', 'snapshot'
  1207.   or 'xwd'. All have manpages. 'imgsnap' is in the imgtools.sw.tools
  1208.   subsystem, 'scrsave' and 'snapshot' are in the eoe2.sw.gltools
  1209.   subsystem, 'xwd' is in x_eoe.sw.Xapps and their manpages are in the
  1210.   respective *.man.* subsystems.
  1211.  
  1212.   From within a GL program, you should call readdisplay().  For an
  1213.   example look at ~4Dgifts/iristools/imgtools/scrsave.c.
  1214.  
  1215. ------------------------------
  1216.  
  1217. Subject:   -49- PROGRAMMING
  1218. Date: 15 May 94 00:00:01 EST
  1219.  
  1220.   This section discusses graphics programming. See the apps, audio and
  1221.   movie FAQs for general, audio and movie programming issues and the
  1222.   impressario, inventor and performer FAQs for discussions of those
  1223.   packages.
  1224.  
  1225. ------------------------------
  1226.  
  1227. Subject:   -50- Can I use 4Dgifts code in my application?
  1228. Date: 07 May 93 00:00:01 EST
  1229.  
  1230.   Yes.  The 4Dgifts are a "gift" and developers are welcome to use the
  1231.   code.  However, SGI does not support the code in 4Dgifts.  Note that
  1232.   certain restrictions apply.  Please read the copyright statement in
  1233.   ~4Dgifts/README.Copyright.
  1234.  
  1235. ------------------------------
  1236.  
  1237. Subject:   -51- What does ERR_WMANIPC mean?
  1238. Date: 07 May 93 00:00:01 EST
  1239.  
  1240.   The "WMAN" in that message means "window manager."  However, this no
  1241.   longer means "window manager" such as 4Dwm, but rather the entire X
  1242.   Window system.  The error means that the GL program triggered a fatal
  1243.   X error.
  1244.  
  1245.   A GL program can get an X error, because all GL programs are actually
  1246.   X clients.  When a GL program does a winopen(), libgl actually calls
  1247.   XCreateWindow, etc.)
  1248.  
  1249.   When a GL program gets an X error, libgl prints out these X errors
  1250.   using this error message:
  1251.  
  1252.       GL: X request = maj.min,  error code = ercode
  1253.  
  1254.   where
  1255.  
  1256.       maj = major request code that caused the error
  1257.       min = minor request code
  1258.       ercode = X error code
  1259.  
  1260.   This turns out to be easy to interpret, so long as the request was a
  1261.   core X protocol request (e.g., a CreateWindow request).  In that
  1262.   case:
  1263.  
  1264.       1. You can look up the major code in /usr/include/X11/Xproto.h.
  1265.       2. The minor code is not used.
  1266.       3. The X error code can be found in /usr/include/X11/X.h.
  1267.  
  1268.   As you can see in Xproto.h, the core X protocol requests have request
  1269.   codes <= 127.
  1270.  
  1271.   However, if maj > 127, then the request is an X extension request.
  1272.   Unfortunately, it can be difficult to interpret this unless you built
  1273.   your program with a debugging libgl.a (compiled with -g).  The reason
  1274.   is that for an X extension, the major request code and the starting
  1275.   error code are copied from the X server during client startup, and
  1276.   these codes are saved in variables inside libgl.  With a debugging
  1277.   libgl, these variables can be printed out from within a debugger,
  1278.   such as dbx.
  1279.  
  1280.   If the major code indicates an X Input extension request, then the
  1281.   minor numbers then tell the X input request type, and these are found
  1282.   in /usr/include/X11/extensions/XIproto.h.
  1283.  
  1284.   Finally, the X Input Extension uses 132 as its "starting error code."
  1285.   The possible errors are found in /usr/include/X11/extensions/XI.h,
  1286.   where they're defined like this:
  1287.  
  1288.       #define XI_BadDevice   0
  1289.       #define XI_BadEvent    1
  1290.       #define XI_BadMode     2
  1291.       #define XI_DeviceBusy  3
  1292.       #define XI_BadClass    4
  1293.  
  1294.   If you add 132 to these numbers, you get the error that's reported by
  1295.   the libgl error message.
  1296.  
  1297. ------------------------------
  1298.  
  1299. Subject:   -52- How can I translate screen (x,y) coords into world
  1300.                 (x,y,z) coords?
  1301. Date: 07 May 93 00:00:01 EST
  1302.  
  1303.   Check the manual page for mapw(3G) or mapw2(3G). mapw() returns a
  1304.   line into (x,y,z) space.
  1305.  
  1306. ------------------------------
  1307.  
  1308. Subject:   -53- How can I translate world (x,y,z) coords into screen
  1309.                 (x,y) coords?
  1310. Date: 07 May 93 00:00:01 EST
  1311.  
  1312.   There are two methods.  The first method is detailed in
  1313.   ~4Dgifts/examples/grafix/world2scrn.c, which is part of the
  1314.   dev.dev_sw.giftsfull package.  It multiplies the (x,y,z) vector into
  1315.   the current modeling and projection matrixes, and uses the result to
  1316.   interpolate based on the window size and position.
  1317.  
  1318.   The second method uses the current cursor position as a trick and is
  1319.   much simpler.  Use cmov() to set the cursor position to the point of
  1320.   interest in world space, then call getcpos() to return the cursor
  1321.   position in screen coordinates.  Note that if your entire viewport is
  1322.   off-screen, the results are undefined and you'll have to use the
  1323.   first method.
  1324.  
  1325.       float x,y,z;
  1326.       short x1, y1;
  1327.       
  1328.       cmov (x,y,z);
  1329.       getcpos (&x1, &y1);
  1330.  
  1331. ------------------------------
  1332.  
  1333. Subject:   -54- Why does nothing happen when I call mapcolor(index, R,
  1334.                 G, B)?
  1335. Date: 07 May 93 00:00:01 EST
  1336.  
  1337.   You either need to call glcompat(GLC_SLOWMAPCOLORS, TRUE) at the
  1338.   beginning of your program, or call gflush() after calling mapcolor.
  1339.  
  1340.   See the NOTES section in "man mapcolors" and also "man glcompat" for
  1341.   further info. (This may also be in the GL release notes)
  1342.  
  1343. ------------------------------
  1344.  
  1345. Subject:   -55- What's wrong with blink() in IRIX 4.0.x?
  1346. Date: 10 Jun 93 00:00:01 EST
  1347.  
  1348.   - blink() is broken all the way up through 4.0.5F, where blink() only
  1349.     blinks to black.
  1350.  
  1351.   - you can work-around this blink() problem by doing the following:
  1352.  
  1353.       blink(rate, index, red<<8, green<<8, blue<<8)
  1354.  
  1355.   - ~4Dgifts/examples/glpg/ch04/blinker.c has three main problems:
  1356.  
  1357.       - it doesn't do the above work-around.
  1358.       - it doesn't do a gflush after mapping colors.
  1359.       - it doesn't turn blinking off initially.
  1360.  
  1361.   - what happens is that if a program starts anything blinking and
  1362.     exits without ever turning blinking off with blink(-1, 0, 0, 0, 0)
  1363.     then the next program to attempt blinking will not be able to
  1364.     blink.  this happens if for instance you close the blinker window
  1365.     before its 10 second sleep() has completed.
  1366.  
  1367.   - a simple idea for a work-around for this problem: programs which do
  1368.     blinking should turn their blinking on when they have focus; they
  1369.     should turn all blinking off when they lose focus.  This is not
  1370.     perfect but is a plausible attempt at sharing the 20 blinking
  1371.     system-wide colormap entries.
  1372.  
  1373.   Here is a copy of ~4Dgifts/examples/glpg/ch04/blinker.c that contains
  1374.   the above workarounds, except for input-focus:
  1375.  
  1376.   #include <gl/gl.h>
  1377.  
  1378.   #define MAXBLINKS       20    /* maximum number of blinking entries */
  1379.   #define FIRSTBLINKCI    64    /* avoid the first 64 colors */
  1380.  
  1381.   main()
  1382.   {
  1383.       int i;
  1384.  
  1385.       prefsize(400, 400);
  1386.       winopen("blinker");
  1387.       ortho2(-0.5, 20.0*MAXBLINKS + 9.5, -0.5, 500.5);
  1388.       color(BLACK);
  1389.       clear();
  1390.  
  1391.       /* always turn blinking off before calling 'blink' */
  1392.       blink (-1, 0, 0, 0, 0);
  1393.  
  1394.       for (i = MAXBLINKS - 1; i >= 0 ; i--) {
  1395.       mapcolor(i + FIRSTBLINKCI, 255, 255, 255);
  1396.       /* always call gflush() after mapcolors() */
  1397.       gflush();
  1398.       color(i + FIRSTBLINKCI);
  1399.       sboxfi(i*20 + 10, 10, i*20 + 20, 490);
  1400.       /* GL bug in blink -- must left-shift r,g,b values */
  1401.       blink(i + 1, i + FIRSTBLINKCI, 255 << 8, 0 << 8, 0 << 8);
  1402.       }
  1403.       sleep(10);
  1404.       blink(-1, 0, 0, 0, 0);      /* stop all blinking */
  1405.       gexit();
  1406.       return 0;
  1407.   }
  1408.  
  1409. ------------------------------
  1410.  
  1411. Subject:   -56- Why can't 'cc' find some standard Xwindows functions?
  1412. Date: 14 May 94 00:00:01 EST
  1413.  
  1414.   You may be linking X libraries, which have complex interdependencies,
  1415.   in the wrong order. Mark Kilgard <mjk@hoot.asd.sgi.com> provided this
  1416.   handy chart:
  1417.  
  1418.   libXm--libXirisw
  1419.                   \
  1420.                    libXt--libXmu--libgl--libXi--libXext--libX11
  1421.                   /
  1422.             libXaw
  1423.  
  1424.   Libraries should be listed in the same order on the cc or ld command
  1425.   line, left to right, as they appear above. If you don't use routines
  1426.   from a library, of course, you don't need it.
  1427.  
  1428. ------------------------------
  1429.  
  1430. Subject:   -57- Where is the library /usr/lib/libgl_s.a for my R4000
  1431.                 Indigo running IRIX 4.0.5F?
  1432. Date: 07 May 93 00:00:01 EST
  1433.  
  1434.   It's in the "maint" software, in the maint_gl_x_dev package.
  1435.  
  1436. ------------------------------
  1437.  
  1438. Subject:   -58- What is a GL widget?
  1439. Date: 10 Jun 93 00:00:01 EST
  1440.  
  1441.   GL widget refers to the GlxDraw (generic) and GlxMDraw (Motif)
  1442.   widgets that allow you to embed GL windows in Xt-based programs.  To
  1443.   embed a GL windows in X-based programs is frequently called
  1444.   "Mixed-model" or "GLX" programming.
  1445.  
  1446.   There are several examples of mixed-model programming in the
  1447.   directory /usr/people/4Dgifts/examples/GLX.
  1448.  
  1449. ------------------------------
  1450.  
  1451. Subject:   -59- I'm using the GlxMDraw widget and it doesn't seem that
  1452.                 colors are being installed correctly.  Overlays in the
  1453.                 GlxMDraw widget are displayed in red and gray instead of
  1454.                 the colors I specify.  What's wrong?
  1455. Date: 10 Jun 93 00:00:01 EST
  1456.  
  1457.   The window manager must be directed to install all appropriate
  1458.   colormaps.  Use the XSetWMColormapWindows() call to do this -- list
  1459.   one window for each colormap to be installed plus the top level
  1460.   window.  If using overlays, include the overlay window as well as the
  1461.   normal GL window.
  1462.  
  1463.   If your window is TrueColor, you should still install the appropriate
  1464.   colormap, as Indigo TrueColor is simulated using a colormap.
  1465.  
  1466. ------------------------------
  1467.  
  1468. Subject:   -60- Is there a way to switch between single and double
  1469.                 buffering within a GL widget on the fly?
  1470. Date: 10 Jun 93 00:00:01 EST
  1471.  
  1472.   There is no way to switch between single and double buffered mode
  1473.   within the same window. (In X, this would mean changing the depth,
  1474.   which is not allowed.)
  1475.  
  1476.   To simulate this, you can create two GL widgets: a double buffered GL
  1477.   widget and a single buffered GL widget.  When it is time to change
  1478.   the buffering mode, restack the windows so that the appropriate one
  1479.   is on top. If the two windows are created with a common parent, they
  1480.   move together when the parent is moved.
  1481.  
  1482.   For non-mixed mode applications, the GL performs this switching when
  1483.   you call gconfig().
  1484.  
  1485. ------------------------------
  1486.  
  1487. Subject:   -61- Why doesn't my X server use backing store? How can I
  1488.                 turn it on?
  1489. Date: 12 Feb 94 00:00:01 EST
  1490.  
  1491.   Mark Kilgard of SGI <mjk@hoot.asd.sgi.com> writes,
  1492.   SGI ships its X server with backing store disabled.  If you edit
  1493.   /usr/lib/X11/xdm/Xservers and remove the -bs option, then restart the
  1494.   X server, backing store will be available.
  1495.  
  1496.   The reason for not turning on backing store by default is two-fold.
  1497.  
  1498.   1) In IRIX 4.0.X the code for managing overlay planes didn't properly
  1499.      take overlays into account so backing store doesn't work if you
  1500.      have overlay windows on the screen. This is fixed in IRIX 5.x.
  1501.  
  1502.   2) In most cases, backing store hurts your performance.  It cases ALL
  1503.      X rendering operations to make an extra (small) traversal through
  1504.      backing store code even if backing store isn't in use.  Also when
  1505.      backing store is in use, it tends to grow the X server since a
  1506.      large amount of memory can easily be used to maintain backing
  1507.      store.
  1508.  
  1509.   One alternative to backing store is to render your image to a pixmap
  1510.   and then blit from the pixmap to the screen in response to expose
  1511.   events.  This will stress the X server a great deal less than using
  1512.   backing store.  Additionally, make sure you are compressing expose
  1513.   events when you redraw.
  1514.  
  1515. ------------------------------
  1516.  
  1517. Subject:   -62- What is "/dev/tport" used for?
  1518. Date: 26 May 93 00:00:01 CST
  1519.  
  1520.   Mark Stadler (mds@sgi.com) says:
  1521.   /dev/tport is a streams-based tty device driver which can be in one
  1522.   of 2 modes:
  1523.  
  1524.   - when X is not running, /dev/tport gets its input from the graphics
  1525.     keyboard and images in the frame buffer (textport mode).  This mode
  1526.     is only intended to be used in single-user mode or during
  1527.     transitional periods when the X server is not running.
  1528.  
  1529.   - when X is running, /dev/tport doesn't get any input and generates
  1530.     no output.  Any programs or shells using /dev/tport hang on reads
  1531.     and toss writes.
  1532.  
  1533.   Kind of a strange device.  But it makes more sense with a clear
  1534.   understanding of how /dev/console works.
  1535.  
  1536.   /dev/console is kind of like a terminal switch box.  Rather than
  1537.   switching physical rs232 cables, we direct console output onto the
  1538.   output stream of other streams-based devices who request such
  1539.   behavior with TIOCCONS ioctl.
  1540.  
  1541.   By default, /dev/console directs its output to /dev/tport.  In the
  1542.   absence of a windowing system this causes console output (including
  1543.   kernel prints) to show up on the textport in front of you.
  1544.  
  1545.   Once the window system is started, the /dev/tport is no longer
  1546.   visible.  Thus the console is no longer visible.  At this point, a
  1547.   terminal emulation window (using streams based ttys) can issue the
  1548.   TIOCCONS ioctl to cause console output (including kernel printfs) to
  1549.   show up in the emulation in the window in front of you.
  1550.  
  1551.   Note that when you bring the window system down, /dev/tport is still
  1552.   there with the same session it started with and the console output
  1553.   redirected back to it again.
  1554.  
  1555. ------------------------------
  1556.  
  1557. Subject:   -63- BUGS AND PROBLEMS
  1558. Date: 15 May 94 00:00:01 EST
  1559.  
  1560.   This section discusses real and apparent bugs and problems we haven't
  1561.   covered already.
  1562.  
  1563. ------------------------------
  1564.  
  1565. Subject:   -64- Why do I get a "Broken Pipe" error when I close an X
  1566.                 client window?
  1567. Date: 10 Jun 93 00:00:01 EST
  1568.  
  1569.   Typically the error message looks like:  XIO: fatal IO error 32
  1570.   (Broken pipe) on X server ":0.0" after 214 requests (214 known
  1571.   processed) with 0 events remaining.  The connection was probably
  1572.   broken by a server shutdown or KillClient.
  1573.  
  1574.   The Window Manager is reporting that the pipe for your X client has
  1575.   been broken.  This is normal when an X client exits.  There is
  1576.   nothing wrong with your system. This message will also occur when the
  1577.   system is shut down.  This is not an error condition and no core
  1578.   files are produced.
  1579.  
  1580. ------------------------------
  1581.  
  1582. Subject:   -65- What do the errors in my 'xdm-errors' file mean?
  1583. Date: 07 May 93 00:00:01 EST
  1584.  
  1585.   It depends on the error message, obviously.  Some are:
  1586.  
  1587.     unable to load display mode, rnid = 196614, errno = 22
  1588.     Failed to unbind rn from clip, rnid = 3,errno = 22
  1589.     bogus window id in rrm request type(2)
  1590.  
  1591.   These are messages related to the communication between the rrm layer
  1592.   in the kernel and the X server.  The messages usually occur when a GL
  1593.   window is being destroyed in a sequence that the X server did not
  1594.   expect.  They are quite benign.
  1595.  
  1596. ------------------------------
  1597.  
  1598. Subject:   -66- Why doesn't SGI's xlock lock my screen?
  1599. Date: 10 Jun 93 00:00:01 EST
  1600.  
  1601.   If you or the super-user don't have a password, xlock will not lock.
  1602.  
  1603.   Under IRIX 4.0.x, xlock is set up by default to act as if invoked
  1604.   with the "-nolock" option, which tells it not to lock the screen.  If
  1605.   you want force xlock to lock, do either of the following:
  1606.  
  1607.   a) Use the "+nolock" option when invoking xlock.  This means
  1608.      "not nolock" (the opposite of "-nolock").  For example:
  1609.  
  1610.      % xlock +nolock
  1611.  
  1612.   b) Add the following line to your ~/.Xdefaults file:
  1613.  
  1614.      XLock.nolock:    False
  1615.  
  1616.   In IRIX 5.x, the default behavior of xlock has been reversed, so
  1617.   xlock does indeed lock by default.  If you wish to keep the IRIX 4.x
  1618.   behavior, invoke xlock with the -nolock option.
  1619.  
  1620. ------------------------------
  1621.  
  1622. Subject:   -67- Sun XView applications like "mailtool" hang my X server
  1623.                 in IRIX 4.0.5.  They come up fine, but when I click on
  1624.                 them the server freezes.
  1625. Date: 07 May 93 00:00:01 EST
  1626.  
  1627.   Any XView application run under the Xsgi X11-server shipped in IRIX
  1628.   versions 4.0.5A through 4.0.5G will lock the X Server on the first
  1629.   mouse click and will not release it until killed from somewhere
  1630.   else.  Fortunately there is a workaround:
  1631.  
  1632.   a) Run the application with '-Wfsdb' on the command line.
  1633.      Alternatively you could use '-fullscreendebug'.  For example:
  1634.  
  1635.      % mailtool -Wfsdb
  1636.  
  1637.   b) If you have the sources, add
  1638.  
  1639.        extern int fullscreendebug;
  1640.  
  1641.      before main() and
  1642.  
  1643.        fullscreendebug = 1;
  1644.  
  1645.      after the xv_init() call.  This forces the program to set this
  1646.      flag in any case - even when run with non-SGI X servers.  It
  1647.      releases you of the danger of omitting -Wfsdb and locking your
  1648.      screen.
  1649.  
  1650.   c) if the program uses the 'fullscreen' package, you might add
  1651.  
  1652.          Fullscreen.Debug: True
  1653.  
  1654.      in $HOME/.Xresources or specify this resource on the command
  1655.      line.  This flag currently disables grabs in both the 'window' and
  1656.      the 'fullscreen' package, but is only set from resources in the
  1657.      'fullscreen' package.
  1658.  
  1659. ------------------------------
  1660.  
  1661. Subject:   -68- Why can't I log into Pandora in IRIX 4.0.1?
  1662. Date: 07 May 93 00:00:01 EST
  1663.  
  1664.   The problem is caused by an incorrect shutdown.  When you log out,
  1665.   xdm runs /usr/sbin/gamma and writes the current value to
  1666.   /etc/config/system.glGammaVal.  IRIX buffers this data in main memory
  1667.   in the buffer cache.  If the system is powered off right after
  1668.   logout, the data is not written to the file.
  1669.  
  1670.   a) Login to your system as root, either via the network or
  1671.      by taking the machine down to single-user mode.
  1672.  
  1673.   b) enter these commands at the # prompt:
  1674.  
  1675.      # cd /etc/config
  1676.      # cat system.glGammaVal
  1677.  
  1678.   If the cat command returns a value of 1.7000, contact your technical
  1679.   support provider for additional troubleshooting.  If the command
  1680.   returns nothing (empty file) or "0", it means the problem can be
  1681.   fixed by entering the following command:
  1682.  
  1683.     # /bin/rm system.glGammaVal
  1684.     # /bin/echo "1.7" > system.glGammaVal
  1685.  
  1686.   Check your work:
  1687.  
  1688.     # cat system.glGammaVal
  1689.  
  1690.   The command above should now return 1.7.
  1691.  
  1692.   Your login should now be successful. If you edited the file while
  1693.   Pandora was running, you'll find the first login attempt will fail,
  1694.   but any later attempts will be successful. After the first login
  1695.   attempt, Pandora will read in the correct gamma value.
  1696.  
  1697. ------------------------------
  1698.  
  1699. Subject:   -69- Pandora won't come up, and /usr/adm/SYSLOG says
  1700.                 "helvetica font missing"
  1701. Date: 07 May 93 00:00:01 EST
  1702.  
  1703.   It appears that the subsystem "eoe2.sw.fonts" did not get loaded.
  1704.   Re-install the subsystem using the following sequence from 'inst':
  1705.  
  1706.   1) type "inst" or boot the mini-root, as documented in Section 4.5
  1707.      of the "IRIS Software Installation Guide"
  1708.   2) keep *
  1709.   3) set neweroverride on
  1710.   4) install eoe2.sw.fonts
  1711.   5) exit
  1712.  
  1713. ------------------------------
  1714.  
  1715. Subject:   -70- Why does the X server sometimes abort when I log out in
  1716.                 IRIX 5.0.1 and IRIX 5.1?
  1717. Date: 01 Oct 93 00:00:01 EST
  1718.  
  1719.   BACKGROUND:  Both problems are related to resetting of the X server.
  1720.   Normally the X server process is spawned by xdm (the X Display
  1721.   Manger).  The X server process continues to run after every login and
  1722.   logout of the graphics head; the server simply resets to its initial
  1723.   state every time someone logs out.  In X server terminology, the X
  1724.   server goes through multiple generations.
  1725.  
  1726.   PROBLEM 1:  The dynamically loadable Display PostScript extension has
  1727.   a bug where it does not properly reset the X server state on server
  1728.   reset (ie, generations other than the first).
  1729.  
  1730.   The problem only occurs if you have dps_eoe.sw.xserver_ext (which
  1731.   contains /usr/lib/X11/dyDDX/xdps.so which is the dynamically loadable
  1732.   Display PostScript extension).  dps_eoe is installed by default.
  1733.  
  1734.   This problem affects all CPUs and graphics hardware.
  1735.  
  1736.   PROBLEM 2:  If the user logs out while any GL-based application (such
  1737.   as buttonfly, WorkSpace, jot, etc) is running, the server will not
  1738.   reset.
  1739.  
  1740.   Typically you will find errors in /usr/adm/SYSLOG similar to the
  1741.   following:
  1742.  
  1743.       date host xdm[pid]: IO Error in XOpenDisplay
  1744.       date host xdm[pid]: Display :0 cannot be opened
  1745.       date host xdm[pid]: Display :0 is being disabled
  1746.       date host xdm[pid]: Rescanning both config and servers files
  1747.  
  1748.   WORKAROUND:  As root, edit /usr/lib/X11/xdm/xdm-config and change the
  1749.   line
  1750.  
  1751.       DisplayManager._0.terminateServer:      False
  1752.  
  1753.   to
  1754.  
  1755.       DisplayManager._0.terminateServer:      True
  1756.  
  1757.   (Please note that the contents of xdm-config are case-sensitive.)
  1758.   Then restart the window system (/usr/gfx/stopgfx; /usr/gfx/startgfx)
  1759.  
  1760.   If the above workaround doesn't work, try setting
  1761.  
  1762.       DisplayManager._0.startAttempts:        1
  1763.  
  1764.   to
  1765.  
  1766.       DisplayManager._0.startAttempts:        4
  1767.  
  1768.   This change forces xdm to try to start the X server up to four times,
  1769.   if the first three fail.
  1770.  
  1771. ------------------------------
  1772.  
  1773. Subject:   -71- After running a few programs, the colors change as the
  1774.                 cursor moves. The colors are usually all wrong in other
  1775.                 windows.
  1776. Date: 07 May 93 00:00:01 EST
  1777.  
  1778.   This is known as colormap flashing. It is caused by the server
  1779.   maintaining 2 separate colormaps, one for GL windows and one for X
  1780.   windows.  As the cursor moves around, the window manager will install
  1781.   the correct colormap for each window.  This will cause colors to be
  1782.   wrong in other windows.  For more information on colormaps and
  1783.   installation please see the Xlib Programming manual, chapter 7 (Vol I
  1784.   of the O'Reilly series).
  1785.  
  1786.   You can sometimes avoid colormap flashing by configuring your X
  1787.   Server to use a 12-bit or 24-bit visual by default.
  1788.  
  1789. ------------------------------
  1790.  
  1791. Subject:   -72- How can I make my X Server use a 12-bit PseudoColor, 12-
  1792.                 bit TrueColor or 24-bit TrueColor visual by default?
  1793. Date: 07 May 93 00:00:01 EST
  1794.  
  1795.   By default, the SGI X Server is configured to use an 8-bit
  1796.   PseudoColor visual.  X-based applications can request other visuals
  1797.   directly if they are available.  Alternatively, you can change the
  1798.   default visual by performing the following steps:
  1799.  
  1800.   a) Run "/usr/bin/X11/xdpyinfo" and check that your server is
  1801.      capable of using a 12-bit or 24-bit visual.  If it is,
  1802.      you will see lines similar to the following:
  1803.  
  1804.      visual id, max buffers, depth:    0x28, 0, 12
  1805.      visual id, max buffers, depth:    0x29, 0, 12
  1806.      visual id, max buffers, depth:    0x2a, 0, 24
  1807.  
  1808.      The last number on each line represents the number of bits
  1809.      available for that visual.
  1810.  
  1811.   b) Log in as root
  1812.  
  1813.   c) Edit the file /usr/lib/X11/xdm/Xservers.  By default it
  1814.      will contain the string:
  1815.        :0 secure /usr/bin/X11/X -bs -c -pseudomap 4sight
  1816.      for a 24-bit TrueColor visual change it to:
  1817.        :0 secure /usr/bin/X11/X -bs -c -class TrueColor -depth 24
  1818.      for a 12-bit PseudoColor visual change it to:
  1819.        :0 secure /usr/bin/X11/X -bs -c -class PseudoColor -depth 12
  1820.  
  1821.   d) Restart your X server.  You can do this by invoking either
  1822.      of the following commands:
  1823.  
  1824.      % killall -TERM Xsgi
  1825.  
  1826.      % /usr/gfx/stopgfx; /usr/gfx/startgfx
  1827.  
  1828.   Note:  X Server visuals are an advanced topic; before making the
  1829.   above changes you should be aware that some 3rd-party and freeware
  1830.   applications might not gracefully adapt to an X Server which supplies
  1831.   anything but an 8-bit PseudoColor visual by default.
  1832.  
  1833. ------------------------------
  1834.  
  1835. Subject:   -73- When I try to run UIM/X uxserverd, I get an error
  1836.                 message saying, "license file has been modified, cannot
  1837.                 start the UIM/X license server".
  1838. Date: 07 May 93 00:00:01 EST
  1839.  
  1840.   You probably have been given a bad key.  The most frequent causes of
  1841.   incorrect keys have been incorrect capitalization and incorrect IP
  1842.   addresses.
  1843.  
  1844.   The program that generates the UIM/X key requires that the "host ID"
  1845.   (or IP address) be in hexadecimal format.  If you feed it the
  1846.   standard form of IP address (i.e., 123.45.678.90) it will generate
  1847.   the wrong key and will not complain.
  1848.  
  1849.   To ensure that you are is giving the correct information when
  1850.   requesting a UIM/X key, please do the following:
  1851.  
  1852.   Hostname:  Type in 'hostname' at the prompt, and be sure to say
  1853.   exactly what it says (including capitalization, if any).
  1854.  
  1855.   Host ID:  Type in 'hostid' at the prompt, and be sure to say exactly
  1856.   what it says.  You will be reading back a series of numbers of the
  1857.   form 0xc030c844.  The leading 0x indicates that the following number
  1858.   is hexadecimal.
  1859.  
  1860.   The key generating script is highly sensitive to capital letters.
  1861.   Make sure you confirm the case of the letters, both when getting the
  1862.   hostname/hostid and when having your key read back to you.
  1863.  
  1864.   If this still doesn't fix the problem, you may have mixed files
  1865.   between UIM/X 1.0 and 2.0.  Completely remove UIM/X, re-install it,
  1866.   and reproduce a Uimx2_0.license file with the correct information.
  1867.  
  1868. ------------------------------
  1869.  
  1870. Subject:   -74- MISCELLANEOUS
  1871. Date: 15 May 94 00:00:01 EST
  1872.  
  1873.   Everything else.
  1874.  
  1875. ------------------------------
  1876.  
  1877. Subject:   -75- What books about the X Window System and OSF/Motif do
  1878.                 you recommend?
  1879. Date: 07 May 93 00:00:01 EST
  1880.  
  1881.   Introductory Texts on the X Window System
  1882.  
  1883.   - O'Reilly and Associates Inc., "The Definitive Guides to the X
  1884.     Window System", by Valerie Quercia and Tim O'Reilly. Vol.  3, "X
  1885.     Window System User's Guide", Sebastopol, CA., 1988, 1989.
  1886.  
  1887.     Discusses being an end user of the X window system.  Covers topics
  1888.     like window manages, font specifications, standard X clients and
  1889.     resources.
  1890.  
  1891.   Texts on X Window System Programming
  1892.  
  1893.   - O'Reilly and Associates, Inc. "The Definitive Guides to the X
  1894.     Window System", by Adrian Nye. Vol. 1, "Xlib Programming Manual",
  1895.     Sebastopol, CA, 1990.
  1896.  
  1897.     Contains the introductory elements for programming with the Xlib,
  1898.     the lowest level of the X window system.  Discusses concepts such
  1899.     as X color capacities, windows, events, drawing primitives.
  1900.  
  1901.   - Young, Douglas A., "X Window Systems Programming and Applications
  1902.     with Xt" (OSF/Motif Edition). Prentice Hall. Englewood Cliffs, NJ.
  1903.     1990.
  1904.  
  1905.     A thorough book starting with the basics of programming with a
  1906.     toolkit though advanced topics.  Contains source code for several
  1907.     small complete applications.  (Source code for this book is also
  1908.     available on line in the /usr/src directory of the Motif
  1909.     Development option.)
  1910.  
  1911.   - O'Reilly and Associates Inc., "The Definitive Guides to the X
  1912.     Window System", by Adrian Nye and Tim O'Reilly. Vol. 4, "X Toolkit
  1913.     Intrinsics Programming Manual", Sebastopol, CA., 1990.
  1914.  
  1915.     Another reference for programming with the OSF/Motif toolkit.
  1916.     Covers topics including basic programming, widgets, resources, and
  1917.     more advanced topics.
  1918.  
  1919.   Reference Texts for the X Window System :
  1920.  
  1921.   - O'Reilly and Associates Inc., "The Definitive Guides to the X
  1922.     Window System", by Adrian Nye. Vol. 2, "Xlib Reference Manual",
  1923.     Sebastopol, CA., 1988.
  1924.  
  1925.     Complete reference for Xlib library routines.
  1926.  
  1927.   - Scheifler, Robert and James Gettys, X Window System, Second
  1928.     Edition, Digital Press, 1990.  ISBN 1-55558-050-5.
  1929.  
  1930.     Referred to as "the Bible" of Xlib and X Protocol reference.
  1931.  
  1932.   Reference Texts for the OSF/Motif Toolkit :
  1933.  
  1934.   - Open Software Foundation, "OSF/Motif Programmer's Guide". Release
  1935.     1.1, Prentice Hall. Englewood Cliffs, NJ. 1990.
  1936.  
  1937.     Exhaustive reference of every widget in the OSF/Motif library.
  1938.  
  1939.   - Asente, Paul J. and Ralph R. Swick. "X Window System Toolkit".
  1940.     X Version 11, Release 4. Digital Press. 1990.
  1941.  
  1942.     Very in-depth reference to the structure and operation of an X
  1943.     window system toolkit.
  1944.  
  1945. ------------------------------
  1946.  
  1947. Subject:   -76- Does the IRIX 5.2 Magic user environment display on an X
  1948.                 terminal?
  1949. Date: 30 Apr 94 00:00:01 EST
  1950.  
  1951.   Joel Tesler <joel@jellotrees.esd.sgi.com> says:  Although it is not
  1952.   officially supported, it should work in IRIX 5.2 MR (but not in the
  1953.   beta release).  There are some glitches.  You probably don't have to
  1954.   set the environment variable _NO_DESKTOP_IMAGES, but try it if you
  1955.   have problems.  There should be no reason to set _SGI_NO_REMOTE_GL.
  1956.  
  1957. ------------------------------
  1958.  
  1959. Subject:   -77- What about OpenGL?
  1960. Date: 22 Oct 94 00:00:01 EST
  1961.  
  1962.   It has its own newsgroup, comp.graphics.opengl, which has an FAQ,
  1963.   which is listed in the misc FAQ. The misc FAQ also points to an
  1964.   OpenGL WWW page.
  1965.  
  1966. ------------------------------
  1967.  
  1968. Subject:   -78- Which SGI machines can run OpenGL now? Which will in the
  1969.                 future?
  1970. Date: 12 Jun 94 00:00:01 EST
  1971.  
  1972.   OpenGL comes with IRIX 5.x. It supports Entry, XS, XS24, XZ, XL,
  1973.   Elan, Extreme, VTX, Reality Engine, and Reality Engine 2 graphics. A
  1974.   later version of OpenGL (sometime this year?) will support G, GT,
  1975.   GTX, VGX, and VGXT graphics.
  1976.  
  1977. ------------------------------
  1978.  
  1979. Subject:   -79- What's this about a copyright dispute over virtual desks
  1980.                 in Indigo Magic?
  1981. Date: 16 Dec 94 00:00:01 EST
  1982.  
  1983.   Xerox has a software patent which may cover the virtual desks which
  1984.   are part of Indigo Magic. It may blow over, or SGI may have to remove
  1985.   virtual desks from Indigo Magic or charge for them. IRIX 5.3 and 6.x
  1986.   include licensing code which will turn off virtual desks by 15 May
  1987.   1995 unless SGI, pending a succesful resolution of the patent dispute,
  1988.   provides a licensing code to its customers. See chapter 1 of the
  1989.   desktop_eoe release notes for details.
  1990.  
  1991. ------------------------------
  1992.  
  1993. End of sgi/faq/graphics Digest
  1994. ******************************
  1995. -- 
  1996. The SGI FAQ group                                sgi-faq@viz.tamu.edu
  1997. Finger us for info on the SGI FAQs, or look in viz.tamu.edu:/pub/sgi.
  1998.